from django.shortcuts import render_to_response
from django.http import HttpResponse

def search_form(request):
    return render_to_response('serch_form.html')

def search(request):
    if 'q' in request.GET:
        message = 'You searched for: %r' % request.GET['q']
    else:
        message = 'YOU submitted an enpty form.'
    return HttpResponse(message)